import  java.util.Scanner;
class Ring{
    public int innerRadius;
    public int outerRadius;

    public int getInnerRadius(){
        return innerRadius;
    }
    public void setInnerRadius(int innerRadius){
        this.innerRadius = innerRadius;
    }
    public int getOuterRadius(){
        return outerRadius;
    }
    public void setOuterRadius(int innerRadius){
        this.outerRadius = outerRadius;
    }

    public Ring(int innerRadius,int outerRadius){
        this.innerRadius = innerRadius;
        this.outerRadius = outerRadius;
        System.out.println("constructor");
    }
    public Ring(){
        this(1,3);
    }

    public int getArea(){
        return (int)(Math.PI*this.outerRadius*this.outerRadius - Math.PI*this.innerRadius*this.innerRadius);
    }
}

public class Main{
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int innerRadius = sc.nextInt();
        int outerRadius = sc.nextInt();
        Ring ring1 = new Ring(innerRadius,outerRadius);
        System.out.println(ring1.getArea());
        Ring ring2 = new Ring();
        System.out.println(ring2.getArea());
    }
}














// import java.awt.*;
// import java.util.*;
// import javax.swing.JPanel;

// import java.io.*;

// class Ring {
// 	public double innerRadius;
// 	public double outerRadius;

// 	public Ring() {
// 		this(1, 3);
// 	}

// 	public Ring(double innerRadius, double outerRadius) {
// 		super();
// 		this.innerRadius = innerRadius;
// 		this.outerRadius = outerRadius;
// 		System.out.println("constructor");
// 	}

// 	public double getInnerRadius() {
// 		return innerRadius;
// 	}

// 	public void setInnerRadius(double innerRadius) {
// 		this.innerRadius = innerRadius;
// 	}

// 	public double getOuterRadius() {
// 		return outerRadius;
// 	}

// 	public void setOuterRadius(double outerRadius) {
// 		this.outerRadius = outerRadius;
// 	}

// 	public int getArea() {
// 		return (int) (Math.PI * (this.outerRadius * this.outerRadius - this.innerRadius * this.innerRadius));
// 	}

// }

// public class Main {

// 	public static void main(String[] args) {
// 		Scanner scan = new Scanner(System.in);
// 		Ring r1 = new Ring(scan.nextDouble(), scan.nextDouble());
// 		System.out.println(r1.getArea());
// 		Ring r2 = new Ring();
// 		System.out.println(r2.getArea());
// 	}
// }

